Modifying data requests(The client provides changed properties)
/v1/collection/id
Complete object information (in JSON format)
201 (Updated)403 (Forbidden)(Servererror)
The following comparison is less used
HEAD
Get metadata for a resource
OPTIONS
Get information,The client can modify the property set.
Whether success
request and response JSON message is shown in table 1.
You must build the consolidation process to complete the scenario described above. The consolidation process acts as a JSON-based REST API to add two numbers to the external world, as shown in Figure 1.
Figure 1. Add two digital-API integration process Design
Fully resource-oriented, the API is represented in plural form
Path (Endpoint)
http://example.com/libraries //列出所有图书馆
http://example.com/books //列出所有图书
http://example.com/libraries/ID/books //列出某个图书馆的全部图书
http://example.com/libraries/ID/books/ID //列出某个图书馆的某本图书
Filter criteria
http://example.com/books?library_id=ID //参数的存在允许AP
and then resend the document to the API user changes, which can be painful if repeated iterations occur. While there are some API design and documentation tools, such as the Swagger UI, which help developers to write documents more easily, they do not eliminate the complexity inherent in the rest
REST itself is a design style rather than a standard. REST talks about a very important thing, how to use Web standards correctly, such as HTTP and URIs. The best way to learn about REST is to think about and understand the Web and how it works . If you design an application
RESTful design Method 1. Domain nameThe API should be deployed under a dedicated domain name whenever possible.https://api.example.comIf you determine that the API is simple, there is no further extension, consider placing it under the primary domain name.https://example.org/api/2. Version (Versioning)The version numbe
Some of the preparatory knowledge required in this article can be seen here: http://www.cnblogs.com/cgzl/p/9010978.html and http://www.cnblogs.com/cgzl/p/9019314.htmlTo establish a Richardson maturity Level 2 post, GET, PUT, PATCH, delete restful API see here: Https://www.cnblogs.com/cgzl/p/9047626.html and https:/ /www.cnblogs.com/cgzl/p/9080960.html and Https://www.cnblogs.com/cgzl/p/9117448.htmlThis article will start the Web
defined by the HTTP method. These HTTP methods usually match the following curd actions:
Create:post
Read:get
Update:put or patch
Delete:delete
I am the split line of Meng MengThe 1.2 Wiki describes rest in this way :
A resource is specified by a URI.
Operations on resources include acquiring, creating, modifying, and deleting resources that correspond exactly to the get, POST, put, and Delete methods provided b
, otherwise the rest request will be rejected. Of course, Developers can note that the following parameter rest no longer requires authentication. Java code
In addition, letting ACTIVEMQ broker provide rest services does not seem to be a good architectural design, which limits the developer's extensibility to
First, what is rest?Rest is not the word "rest", but a few acronyms-representational state Transfer Direct translation: Presentation layer status transfer, but this translation normal people simply do not understand, find a best understanding of the argument is that theURL location resources, Use the HTTP verb (get,post,delete,detc) to describe the operation .Ii.
Designing a good rest-style API is very difficult! The API is the contract between the service provider and the consumer, and breaking the contract will bring a lot of trouble to the server developers, the trouble comes from the developers who use the API, because changes to the AP
Objective:Recently, using SPRINGMVC to write a lot of rest API, feel really a good framework. Some of the previous articles on rest APIs are still not perfect. For example, when the parameter is missing, the type mismatch situation, directly throws an exception, the content returned is the wrong page of the researcher, rather than JSON content, which makes the mo
0, application backgroundThe Rest ful API is Fielding (Uncle downstairs) in his paper "Architectural Styles and the Design of network-based software Architectures", paper address : http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm. (。。。 )
Because recently do hybird App, need to call t
In application development, a large number of CRUD operations are performed on resources, and crud refers to Creation (create), get (Read), update (update), and Destroy (DELETE). 2000 Roy Fielding in his Ph. D. thesis "Architectural Styles and the design of network-based Software architectures" Architecture and web-based Software architecture Design "Rest" is pro
Rest refers to a set of schema constraints and principles that meet constraints and principles of application design.Architecture, the software architecture is divided into three parts: building, describing a computer, a connector that describes the link part of the build, and a configuration that makes the build and connector an organic whole.Basic Web technologies:URI (Uniform Resource Identifier) HTTP (Hypertext Transfer Protocol) (post, get, put,
result contains all the tasks for this task flow. This return result sequence table can refer to the " get application information by ID " section abovecompare the execution of a taskGiven the IDs of two tasks, the results of two task comparisons are returnedUriHttp://Request parameters
Parameter
Description
Flow-exec-id1
Flow execution ID or URL (azkaban) of first flow
Flow-exec-id2
Flow execution ID or URL (azkaban) of second flow
Label:The REST design principle is statelessness, but when the client is an app, the request from the app is not based on Bowers and cannot carry the same sessionid, so the better solution is to have a accesstoken for each request. Then the background is based on token to find the user, and then find the user resources But it is not always possible for each method to call token authentication method, or eve
structure through URLs. Rest is a simple set of design principles, an architectural style (or pattern), not a specific standard or architecture. Rest has many successful use cases, the famous delicious and Flickr provide RESTful API usage, client invocation is also extremely convenient, here is a simple
Reprint, Source: http://blog.csdn.net/berryreload/article/details/9126645Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.Find a half-day, or the Watercress API easy to use ~ ~ ~Example:https://api.douban.com/v2/book/isbn/:9787111128069Results:{"rating": {"Max": Ten, "Numraters": 2576, "average": "9.3", "Min": 0}, "subtitle": "", "Author": ["(US) Bri
Rest is the presentation of state passing, which is not a standard design style. The rest architecture style has the following 6 constraints:1. Client-Server (client-server): Communication can only be initiated unilaterally by the client and is represented as a request-response form.2. Stateless: The session state of the communication should all be maintained by
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.